package com.htao.train.common.exception;

/**
 * @Author： HTTT
 * @Date： 2023/12/22 15:41
 * @Describe：
 */
public enum BusinessExceptionEnum {
    /*
    * 自定义异常枚举
    * */
    MEMBER_MOBILE_EXIT("手机号已注册"),
    MEMBER_MOBILE_NOT_CODE("请先发送验证码"),
    MEMBER_MOBILE_CODE_ERROR("验证码错误"),

    BUSINESS_STATION_NAME_UNIQUE_ERROR("车站已存在"),
    BUSINESS_TRAIN_CODE_UNIQUE_ERROR("车次编号已存在"),
    BUSINESS_TRAIN_STATION_INDEX_UNIQUE_ERROR("同车次站序已存在"),
    BUSINESS_TRAIN_STATION_NAME_UNIQUE_ERROR("同车次站名已存在"),
    BUSINESS_TRAIN_CARRIAGE_INDEX_UNIQUE_ERROR("同车次厢号已存在"),
    BUSINESS_SEAT_NOT_ENOUGT("座位不足"),
    BUSINESS_SEAT_OTHER("出现了不可能存在的座位"),
    BUSINESS_CONFIRM_ORDER("服务器忙，请稍后重试"),
    CONFIRM_ORDER_FLOW_EXCEPTION("排队的人太多了，请稍后重试"),
    CONFIRM_TOKEN_EXCEPTION("抢票人数太多了,请稍后再抢"),

    LOGIN_MUCH("稍后重试，发送验证码频繁");
    private String desc;

    BusinessExceptionEnum(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "BusinessExceptionEnum{" +
                "desc='" + desc + '\'' +
                '}';
    }
}
